home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MIDICraft's MIDINET CD-ROM
/
MIDICraft's MIDINET CD-ROM.iso
/
DOSUTILS
/
MIDITRK.DOC
< prev
next >
Wrap
Text File
|
1997-03-29
|
9KB
|
278 lines
******************************
MIDITRK v1.5
midi track information
by Guenter Nagler
1995
(gnagler@ihm.tu-graz.ac.at)
******************************
[1] BACKGROUND
I programmed this application to have a c++ module that can be used
in some of my other midi applications for simply adding an option -track
that displays a short track description table. This program was therefore
needed to test this module as a standalone program.
Now I use this program to get an overview about the tracks.
[2] FILES DESCRIPTION
MIDITRK.EXE.........dos utility program
MIDITRK.DOC.........this file, showing usage of MIDITRK.EXE
MIDIIO.HPP..........header file for a c++ midi parser
MIDIIO.CPP..........source code for a c++ midi parser
MTRACK.HPP..........header file for collecting midi track information
MTRACK.CPP..........source code for collecting midi track information
MIDITRK.CPP.........c++ source code for midi to text
PROGNAME.CPP........tables for GM, GS, XG program names
PROGNAME.H..........header for access to program tables
MIDITRK.MAK.........make file for project
MIDITRK.CFG.........compiler options for make
MIDITRK.PRJ.........project for borland c++ compilers
only MIDITRK.EXE is required to run program
[3] COPYRIGHT
MIDITRK (c) 1995 was created by Guenter Nagler.
MIDITRK is free and may be used as you wish with this one exception:
You may NOT charge any fee or derive any profit for distribution
of MIDITRK. Thus, you may NOT sell or bundle MIDITRK with any
product in a retail environment (shareware disk distribution, CD-ROM,
etc.) without permission of the author.
You may give MIDITRK to your friends, upload it to a BBS, or ftp it to
another internet site, as long as you don't charge anything for it.
[4] DISCLAIMER
MIDITRK was designed to handle 100% compatible standard midi files.
So I give no guarantees of the results, especially with non 100%
compatible midi files.
If you find a midi file that you think to be 100% compatible midi
that is not correctly handled, please send a sample file to
gnagler@ihm.tu-graz.ac.at .
Use MIDITRK at your own risk. Anything you do with MIDITRK is your
responsibility, and not the author's. Any damage caused to any person,
computer, software, hardware, company, or business by running MIDITRK
is your responsibility, and the author will not be liable.
If you don't understand these terms, or are not sure of something, or
are afraid something bad might come of using MIDITRK, don't use it!
You are here forewarned.
[5] INSTALLATION
[MSDOS]
Simply copy MIDITRK.EXE in a directory that is in your path.
When you start the program without arguments
C:\> MIDITRK
you should get the usage text (see next section)
[UNIX]
compile sources with your C++ compiler (e.g. GNU Compiler g++):
g++ -o miditrk miditrk.cpp midiio.cpp mtrack.cpp progname.cpp
and run program
$ miditrk
[6] USAGE
usage: MIDITRK [-verbose] file.mid [> file.txt]
The parts in brackets [...] are optional.
The text output is normally written to screen but can be relinked
to a file (> filename.txt) or a printer (> prn). See your MS-DOS/UNIX
manual for usage of > and >> operators.
The program MIDITRK allows some options:
-verbose shows detailed information of tracks
[7] A sample of resulting text output
command> miditrk sample.mid
File sample.mid:
Track 1 [NOCHANNEL]: Sample Midi
Track 2 [1]: (AnalogPad)
Track 3 [2]: (SynthBass2)
Track 4 [3]: (CleanGtr)
Track 5 [4]: (SynCalinope)
Track 6 [5]: (GhostPad)
Track 7 [6]: (Piano)
Track 8 [7]: (AirChorus)
Track 9 [8]: (Rezzo4ths)
Track 10 [9]: (BX-3Organ)
Track 11 [10]: (Drums)
Track 12 [11]: (OverDrive)
Track 13 [12]: (OverDrive)
shows the tracks contained in the midi file sample.mid in following form:
Track tracknumber [trackchannel]: tracktitle (trackprogram)
tracknumber is a number between 1 and the number of tracks.
The trackchannel is between 1 and 16 (where channel 10 are drums in general
midi files). The channel is NOCHANNEL when the track does not contain
any notes. It is MULTICHANNEL when the track contains more than one
channels (usually found in format 0 midi files).
The tracktitle is optional and may contain any text (including those without
any sense).
The trackprogram name is missed if the track does not set a program
(instrument). It is the name of the first chosen general midi program
in this track. It is (Drums) for all tracks at channel 10.
command> miditrk -verbose sample.mid
File sample.mid:
Tempo: 60.00 beats/min
Tact: 4/4
Resolution: 1/384
Track 1:
channel: NOCHANNEL
name: Sample Midi
Track 2:
channel: 1
program: AnalogPad
volume: 110 (0=mute,127=full)
balance: 64 (0=left, 64=mid, 127=right)
chorus: 90 (0-127)
reverb: 80 (0-127)
Track 3:
channel: 2
program: SynthBass2
volume: 110 (0=mute,127=full)
balance: 64 (0=left, 64=mid, 127=right)
chorus: 70 (0-127)
reverb: 0 (0-127)
Track 4:
channel: 3
program: CleanGtr
volume: 110 (0=mute,127=full)
balance: 64 (0=left, 64=mid, 127=right)
chorus: 80 (0-127)
reverb: 127 (0-127)
Track 5:
channel: 4
program: SynCalinope
volume: 110 (0=mute,127=full)
balance: 64 (0=left, 64=mid, 127=right)
chorus: 30 (0-127)
reverb: 127 (0-127)
Track 6:
channel: 5
program: GhostPad
volume: 110 (0=mute,127=full)
balance: 24 (0=left, 64=mid, 127=right)
chorus: 30 (0-127)
reverb: 127 (0-127)
Track 7:
channel: 6
program: Piano
volume: 110 (0=mute,127=full)
balance: 44 (0=left, 64=mid, 127=right)
chorus: 90 (0-127)
reverb: 127 (0-127)
Track 8:
channel: 7
program: AirChorus
volume: 110 (0=mute,127=full)
balance: 104 (0=left, 64=mid, 127=right)
chorus: 50 (0-127)
reverb: 127 (0-127)
Track 9:
channel: 8
program: Rezzo4ths
volume: 110 (0=mute,127=full)
balance: 64 (0=left, 64=mid, 127=right)
chorus: 20 (0-127)
reverb: 90 (0-127)
Track 10:
channel: 9
program: BX-3Organ
volume: 110 (0=mute,127=full)
balance: 64 (0=left, 64=mid, 127=right)
chorus: 20 (0-127)
reverb: 127 (0-127)
Track 11:
channel: 10
program: Drums
volume: 110 (0=mute,127=full)
balance: 64 (0=left, 64=mid, 127=right)
chorus: 5 (0-127)
reverb: 90 (0-127)
Track 12:
channel: 11
program: OverDrive
volume: 110 (0=mute,127=full)
balance: 64 (0=left, 64=mid, 127=right)
chorus: 127 (0-127)
reverb: 127 (0-127)
Track 13:
channel: 12
program: OverDrive
volume: 110 (0=mute,127=full)
balance: 127 (0=left, 64=mid, 127=right)
chorus: 40 (0-127)
reverb: 127 (0-127)
The tempo information is shown in beats (=quarternotes) per minute.
Tempo 40 beats/min is very slow and 240 beats/min is very speedy.
Tempo could change during playing the midi, only the first tempo setting
is shown (default is 120 beats/min).
The tact information is shown as nominator / denominator. Usually tacts are
4/4, 3/4 (waltz), 6/8. Tact can change during playing a midi song. Only the
first tact setting is shown (default is 4/4).
The resolution information shows the smallest usable note/pause duration
in this song. 1/384 and 1/768 are typical resolutions. Normally this value
is of form 1/(3 * (2^^n)) as 1/384 = 1/(3 * (2^^7)), so that trioles of
a 128th note could be used.
Volume information is a value in range of 0 and 127 where 0 is silent (mute)
and 127 is very loud.
Balance information is a value in range of 0 and 127. At value 0 the notes
can only be heared at left output channel (box). At value 1 the notes can
only be heared at right output channel. At value 64 the notes can be heared
at both channel at same volume.
Chorus and reverb effect values are in range of 0 and 127.
[8] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
WWW: http://hgiicm.tu-graz.ac.at/Cpub
contains all my dos/unix midi programs
EMAIL: gnagler@ihm.tu-graz.ac.at
[9] CHANGES
v1.0 to v1.1:
* added midi format information in verbose output
v1.1 to v1.2
* shows midi channels of multi channel track
v1.2 to v1.3
* shows default program setting of channels/tracks that don't set programs
* bug fixed: show channels/tracks that use nothing but note commands
* bug fixed: index -1 used when accessing channel_used array
(could cause segmentation fault)
* track names are now written between "..." to distinguish from rest
(sometimes tracknames contain parentheses)
* bug fixed: ignored channels in multichannel tracks that didn't play
notes
* calculation of tempo in beats/beat without using floating point
arithmetics
v1.3 to v1.4
* using larger buffer to find track channel
v1.4 to v1.5
* support different midi modes (GM, GS, XG) to get exactlier program names
midi file nees to contain mode reset sysex that GS and XG instruments
are shown (default: GM mode is assumed).